﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MySpace.Data;
/// <summary>
///LotteryTable 的摘要说明
/// </summary>
namespace DataBaseTable
{
    public class LotteryTable : DBTable
    {
        private const string tableName = "Lottery";//表名
        public LotteryTable()
            : base(GetHandler.Init(), tableName)
        {
            this.GetRow();
            //没有参数重载
        }
        public LotteryTable(int id)
            : base(GetHandler.Init(), tableName)
        {
            this.Filter = "id=?";
            this.AddParameter("id", id);
            this.GetRow();
            //没有参数重载
        }
        /// <summary>
        /// ID
        /// </summary>
        public int ID
        {
            get
            {
                try { return (int)this.DataRow["id"]; }
                catch { return 0; }
            }
        }
        /// <summary>
        /// 活动名称
        /// </summary>
        public string LotteryName
        {
            get
            {
                try { return (string)this.DataRow["LotteryName"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["LotteryName"] = value;
            }
        }
        /// <summary>
        /// 活动时间
        /// </summary>
        public string LotteryDate
        {
            get
            {
                try { return (string)this.DataRow["LotteryDate"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["LotteryDate"] = value;
            }
        }
        /// <summary>
        /// 活动简介
        /// </summary>
        public string LotteryDetail
        {
            get
            {
                try { return (string)this.DataRow["LotteryDetail"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["LotteryDetail"] = value;
            }
        }
        /// <summary>
        /// 是否已经抽奖
        /// </summary>
        public int isDraw
        {
            get
            {
                try { return (int)this.DataRow["isDraw"]; }
                catch { return 0; }
            }
            set
            {
                this.DataRow["isDraw"] = value;
            }
        }
    }
}